package com.dobest.alipaywool.phone;

import java.util.HashSet;
import java.util.Set;

/**
 * @author: hujiansong
 * @since: 2018/12/4 13:58
 */
public class PhoneGenerator {

    private static final int TOTAL_SIZE = 5_000;

    /**
     * 5_000个手机号
     */
    public static final Set<String> RANDOM_PHONE = new HashSet<>();

    /**
     * 已经发送手机
     */
    public static final Set<String> SEDNED_PHONE = new HashSet<>();

    private static final String[] phoneTmp = new String[]{"1500173", "1507121", "1592764", "1592750"};

    static {
        while (RANDOM_PHONE.size() < TOTAL_SIZE) {
            String phonePrefix = phoneTmp[RANDOM_PHONE.size() % phoneTmp.length];
            RANDOM_PHONE.add(phonePrefix + (int) ((Math.random() * 9 + 1) * 1000));
        }
    }


    public static void main(String[] args) {
        for (String s : RANDOM_PHONE) {
            System.out.println(s);
        }
    }

}
